<style>
    /* 登录窗口 */
    .formLib {
        padding: 20px 0;
        clear: both;

    }


    .formLib input {
        padding: 0 10px;
        height: 36px;
        border: 1px solid #ccc;
        background: url() #fff repeat-x;
    }

    .formLib .form_lilib {
        position: relative;
        margin-bottom: 20px;
        font-size: 0;
    }

    .form_lilib * {
        display: inline-block;
        *display: inline;
        *zoom: 1;
        vertical-align: top;
        font-size: 14px;
        line-height: 36px;
    }

    .form_lilib label {
        width: 100px;
        height: 36px;
        text-align: right;
        padding-right: 5px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .form_lilib span {
        padding: 0 5px;
    }

    .from_msg {
        padding-left: 10px;
        font-size: 12px;
        color: #999;
    }

    .from_msg a {
        color: #3595CC;
    }

    .form_libtn {
        padding-left: 105px;
        font-size: 12px;
        color: #999;
    }

    .formLib .BB_button {
        line-height: 30px;
        padding: 0 30px;
        border: none;
        background: #f40;
        color: #fff;
        cursor: pointer;

    }
    .loading16{background:url(/images/loading-16x16.gif) no-repeat center center;min-height:32px}
    .loading32{background:url(/images/loading-32x32.gif) no-repeat center center;min-height:64px}
</style>
<script type="text/javascript">

    $("#amount").on('input  propertychange', function() {
        //如果输入非数字，则替换为''
        this.value = this.value.replace(/[^\d\.]/g, '');
        //必须保证第一个为数字而不是.     
        this.value = this.value.replace(/^\./g, '');
        //保证只有出现一个.而没有多个.     
        this.value = this.value.replace(/\.{2,}/g, '.');
        //保证.只出现一次，而不能出现两次以上     
        this.value = this.value.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.');
        //只能输入两位小数
        this.value = this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3');
    });
    function alipay() {

        var amount = $("#amount").val();
        var alipay_account = $("#alipay_account").val();
        var alipay_name = $("#alipay_name").val();
        var vcode = $("#xloginCheckTokenId").val();
        if (amount <= 0) {
            $("#err_msg").text("提现金额不能小于或等于0！").show();
            return;
        } else {
            $("#err_msg").hide();
        }
        if (alipay_account.length <= 0) {
            $("#err_msg").text("支付宝登录账号不能为空!").show();
            return;
        } else {
            $("#err_msg").hide();
        }
        if (alipay_name.length <= 0) {
            $("#err_msg").text("支付宝姓名不能为空!").show();
            return;
        } else {
            $("#err_msg").hide();
        }
        if (vcode.length <= 0) {
            $("#err_msg").text("验证码不能为空!").show();
            return;
        } else {
            $("#err_msg").hide();
        }
        jQuery('#ManageProductListView').showLoading();
        $.ajax({
            url: "__SELF__",
            type: "post",
            dataType: "json",
            data: {
                amount: amount,
                alipay_account: alipay_account,
                alipay_name: alipay_name,
                vcode: vcode
            },
            success: function(data) {
                if (data.status == 1) {
                    layer.msg(data.info, 1, 1, function() {
                        location.reload();
                    });
                } else {
                    layer.msg(data.info, 3);
                    $('#imgValidateCode').trigger('click');
                }
                jQuery('#ManageProductListView').hideLoading();
            },
            error: function(XMLHttpRequest, textStatus, errorThrown) {

                var errMsg = XMLHttpRequest.responseText;
                layer.msg("出错啦!请重试", 3, 8);
            }
        })

    }
</script>
<div class="me-skylight">

    <div class="" id="loading" style='margin-top:10px;'>
        <span>
            <p id="" style="font-size: 16px;">本提现为客服转账，需要您填写正确的<b>支付宝账号，以及支付宝账号姓名</b>。提交后由客服转账，提现状态请到提现记录查看。</p>
            <br />
            <p id="" style="font-size: 12px;">提现记录可以在<b><a href="{:U('Task/TransactionRecords')}" target="_blank">交易流水</a></b>查看。</p>
        </span>
        <ul class="formLib">
            <li class="form_lilib">
                <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;要提现的金额：</span>
                <input type="text" id="amount" name="amount" placeholder="请输入提现金额" style="width: 320px" maxlength="11">
                <!--<a  href='http://www.mlieasy.com/seller/SellerDetail?sellerId=32' target="_blank"  class="from_msg">什么是订单号？</a>-->
            </li>
            <li class="form_lilib">
                <span>收款的支付宝账号：</span>
                <input type="text" id="alipay_account" name="alipay_account" placeholder="您的支付宝登录账号" style="width: 320px">
                <!--<a   class="from_msg" target="_blank" href='http://www.mlieasy.com/seller/SellerDetail?sellerId=31'>什么是支付宝账号？</a>-->
            </li>
            <li class="form_lilib">
                <span>收款的支付宝姓名：</span>
                <input type="text" id="alipay_name" name="alipay_name" placeholder="您的支付宝姓名" style="width: 320px">
                <!--<a   class="from_msg" target="_blank" href='http://www.mlieasy.com/seller/SellerDetail?sellerId=31'>什么是支付宝账号？</a>-->
            </li>
            <li class="form_lilib">

                <span> 请输入验证码：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                <input type="text" id="xloginCheckTokenId" name="xloginCheckTokenId" placeholder="请输入验证码" autocomplete="off" style="width: 100px;">
                <img id="imgValidateCode" src="{:U('Account/verify')}" title="看不清，换一张" style="cursor: pointer;" height="38">
            </li>

            <li class="form_libtn form_regtn">
                <span id="err_msg" class="from_msg" style="color: red; display: block; margin-bottom: 10px"></span>
                <input type="button" class="BB_button" onclick="alipay()" value="确认以上信息，提交">
            </li>
        </ul>

    </div>
</div>
<script>
    $('#imgValidateCode').click(function() {
        $(this).attr('src', "{:U('Account/verify')}?" + Math.random());
    });
</script>
